<!-- 权限变更查询 -->
<template>
  <div>
    <yxt-table
      :api-url="getzbjg"
      title="权限变更查询"
      table-title="用户列表"
      :table-column="tableColumn"
      :other-config="otherConfig"
      :setup-config="setupConfig"
      :dict="dict"
      selection="false"
      :search-config="searchConfig"
      :search-reset="searchReset"
    >
      <!-- <template v-slot:glyh="{row}">
        <el-button type="primary" size="mini">查看{{ row.id }}</el-button>
      </template> -->
      <!-- 数据列表操作按钮插槽 -->
      <template v-slot:multiple-operation="{ selectionData }">
        <el-button
          type="primary"
          size="small"
          @click="handleAdd(selectionData)"
        >新增</el-button>
        <el-button
          type="primary"
          size="small"
          @click="handleAdd(selectionData)"
        >导出</el-button>
      </template>
    </yxt-table>
  </div>
</template>

<script>
import yxtTable from '@/components/Table/index.vue'
import { getzbjg } from '@/api/zbjg.js'
export default {
  name: 'MenuManagement',
  components: {
    yxtTable
  },
  data() {
    return {
      getzbjg, // 接口
      // 表格数据
      tableColumn: [
        { prop: 'ZBFWF_ZBBH', label: '菜单ID' },
        { prop: 'ZBFWF_ZBDW', label: '登录账号' },
        { prop: 'ZBFWF_ZBDW', label: '用户姓名' },
        { prop: 'ZBFWF_ZBDW', label: '角色名称' },
        { prop: 'ZBFWF_ZBDW', label: '部门名称' },
        { prop: 'ZBFWF_ZBDW', label: '修改时间' },
        { prop: 'ZBFWF_ZBDW', label: '业务类型' },
        { prop: 'ZBFWF_ZBDW', label: '修改内容' },
        { prop: 'ZBFWF_ZBDW', label: '轮播时间' }
      ],
      // 其他配置 主要是配置接口返回值有的不是list
      otherConfig: {
        list: 'list'
      },
      // 操作按钮
      setupConfig: {
        fixed: 'right', // 操作列固定
        width: 0, // 操作列宽度
        edit: true, // 编辑
        del: true// 删除
      },
      // 字典
      dict: {
        status: [
          { code: 0, name: '打卡失败' },
          { code: 1, name: '打卡成功' },
          { code: 2, name: '就不打卡' }
        ]
      },
      // 搜索条件
      searchConfig: [
        { type: 'input', key: 'name', placeholder: '请输入登录账号' }
      ],
      // 搜索条件重置
      searchReset: {
        zbfwfZbbh: '',
        zbfwfFbbh: '',
        zbfwfZbdw: '',
        zbfwfFkrqFrom: '',
        zbfwfFkrqTo: '',
        zbfwfXmdw: '',
        pageNumber: 1,
        pageSize: 20
      }
    }
  },
  methods: {
    handleAdd(selectionData) {
      console.log('新增', selectionData)
    },
    handleDelete(row) {
      console.log(row, '删除')
    },
    handleEdit(row) {
      console.log('编辑', row)
    }
  }
}
</script>
  <style scoped lang="scss">
</style>

